﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace TipokHostManager.WMIManager
{
    /// <summary>
    /// 默认构造实例的基类
    /// </summary>
    /// <typeparam name="T">Class</typeparam>
    public class ManagementSingle<T> where T : class, new()
    {
        private static T _Instance;
        public static T Instance
        {
            get
            {
                Interlocked.CompareExchange<T>(ref _Instance, new T(), null);
                return _Instance;
            }
        }
    }
}
